import fetch from '@/utils/fetch'
import { init } from 'echarts'

const AdminApi = {
  getPageList (params) {
    return fetch({
      url: '/api/business/admin/page',
      method: 'get',
      params: params
    })
  },
  add (params) {
    return fetch({
      url: '/api/business/admin',
      method: 'post',
      data: params
    })
  },
  update (params) {
    return fetch({
      url: '/api/business/admin/' + params.id,
      method: 'put',
      data: params
    })
  },
  del (params) {
    return fetch({
      url: '/api/business/admin/' + params,
      method: 'delete'
    })
  },
  init (params) {
    return fetch({
      url: '/api/business/admin/adminInit',
      method: 'get',
      params: params
    })
  }
}
export default AdminApi
